import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        int n = in.nextInt(),x = in.nextInt();
        int[] array = new int[n + 1];
        for (int i = 0; i < n; i++) {
            array[i] = in.nextInt();
        }
        int right = 0,left = 0;
        int minLen = Integer.MAX_VALUE;
        int[] ret = {-1,-1};
        int sum = 0;
        while(right < n){
            sum += array[right];
            int curLen = right - left + 1;
            while(sum >= x && left <= right){
                if(curLen < minLen){
                    minLen = curLen;
                    ret[0] = left ;
                    ret[1] = right;
                }
                sum -= array[left];
                left++;
            }
            right++;
        }
        System.out.println(ret[0] + " "+ ret[1]);
    }
}